<?php include_once "controle/controle.php"; ?>
<!DOCTYPE html>
<html>
    <head>
        <title>Controle de Eventos - AnguloWeb</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="cache-control" content="max-age=0">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="pragma" content="no-cache">
        <meta name="robots" content="noindex, nofollow">
        
        <link rel="stylesheet" href="css/estilo.css" type="text/css" media="screen">
        <script type="text/javascript" src="../js/estado_cidade.js" ></script>
        <script type="text/javascript" src="../js/javascript.js" ></script>
        <script type="text/javascript" src="../js/aw_validacao.js" ></script>
        <script type="text/javascript" src="../js/valida.js" ></script>
    </head>
    <body>
        <div id="center">
            <?php if(logado()){ ?>
            <header>
                <div id="logo">
                    <img src="<?=logoEmpresa()?>" alt="<?=nomeEmpresa()?>" id="imagem_logo"  <?=ajustaLogo()?>>
                </div>
                <div id="nome_empresa" <?=ajustaNomeEmpresa()?>>
                    <label><?=nomeEmpresa()?></label>
                </div>
                <div id="id_usuario">
                    <label>Olá <?=$_SESSION["ce_nome"]?> | <a href="?pag=cnf" title="Configurações">Configurações</a> | <a href="?sair=1" title="Sair">Sair</a></label>
                </div>
                <menu>
                <ul>
                    <li class="menu_li">
                        <a href="?pag=" id="m_inicio"><span>Início</span></a>
                    </li>
                    <?php if(master()){ ?>
                    <li class="menu_li">
                        <a href="?pag=evt" id="m_eventos"><span>Eventos</span></a>
                        <ul>
                            <li><a href="?pag=evtSet">Novo</a></li>
                            <li><a href="?pag=evt">Consultar</a></li>
                            <li><a href="?pag=art">Artigos</a></li>
                        </ul>
                    </li>
                    <li class="menu_li">
                        <a href="?pag=bol" id="m_boleto"><span>Boleto</span></a>
                        <ul>
                            <li><a href="?pag=bolSet">Novo</a></li>
                            <li><a href="?pag=bol">Consultar</a></li>
                        </ul>
                    </li>
                    <?php } ?>
                    <li class="menu_li">
                        <a href="" id="m_es"><span>Entrada / Saída</span></a>
                        <ul>
                            <li><a href="?pag=ces_ent">Entrada</a></li>
                            <li><a href="?pag=ces_sai">Saída</a></li>
                        </ul>
                    </li>
                    <?php if(master()){ ?>
                    <!--
                    <li class="menu_li">
                        <a href="?pag=cliente" id="m_palestras"><span>Palestras</span></a>
                        <ul>
                            <li><a href="?pag=clienteSet">Novo</a></li>
                            <li><a href="?pag=cliente">Consultar</a></li>
                        </ul>
                    </li>
                    -->
                    <li class="menu_li">
                        <a href="?pag=trs" id="m_transacao"><span>Transacao</span></a>
                        <ul>
                            <li><a href="?pag=trsSet">Novo</a></li>
                            <li><a href="?pag=trs">Consultar</a></li>
                        </ul>
                    </li>
                    <?php } ?>
                </ul>
                </menu>
            </header>
            <div id="linha"></div>
            <section>
                <?php
                if(master()){
                    switch($_GET["pag"]){
                        case "evt"     : include_once "visao/eventos.php";     echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "evtSet"  : include_once "visao/eventoSet.php";   echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "ins"     : include_once "visao/instituicao.php"; echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "insc"    : include_once "visao/inscritos.php";   echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "inscSet" : include_once "visao/inscritoSet.php"; echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "txinsc"  : include_once "visao/txInscricao.php"; echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "info"    : include_once "visao/informacoes.php"; echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "art"     : include_once "visao/artigo.php";      echo "<script>bg_menu('m_eventos');</script>\n"; break;
                        case "bolSet"  : include_once "visao/boletoSet.php";   echo "<script>bg_menu('m_boleto');</script>\n"; break;
                        case "bol"     : include_once "visao/boleto.php";      echo "<script>bg_menu('m_boleto');</script>\n"; break;
                        case "trs"     : include_once "visao/transacao.php";   echo "<script>bg_menu('m_transacao');</script>\n"; break;
                        
                        case "ces_ent" : $_SESSION["ces_tipo"] = "Entrada"; include_once "visao/ces.php"; echo "<script>bg_menu('m_es');</script>\n"; break;
                        case "ces_sai" : $_SESSION["ces_tipo"] = "Saída";   include_once "visao/ces.php"; echo "<script>bg_menu('m_es');</script>\n"; break;
                        
                        case "cnf"     : include_once "visao/configuracoes.php"; break;
                        case "uss"     : include_once "visao/usuarioSet.php";    break;
                        
                        default: include_once "visao/home.php"; echo "<script>bg_menu('m_inicio');</script>\n"; break;
                    }
                }else{
                    switch($_GET["pag"]){
                        case "ces_ent" : $_SESSION["ces_tipo"] = "Entrada"; include_once "visao/ces.php"; echo "<script>bg_menu('m_es');</script>\n"; break;
                        case "ces_sai" : $_SESSION["ces_tipo"] = "Saída";   include_once "visao/ces.php"; echo "<script>bg_menu('m_es');</script>\n"; break;
                        
                        default: include_once "visao/home.php"; echo "<script>bg_menu('m_inicio');</script>\n"; break;
                    }
                }
                    echo "
            </section>";
                }else{
                    include_once "visao/login.php";
                }
                ?>
            
            <footer>
                <label>Controle de Eventos</label><br>
                <a href="http://www.anguloweb.com.br/" title="AnguloWeb">&COPY; ÂnguloWeb Soluções para Internet - Todos os direitos reservados&nbsp;&nbsp;</a>
                <a href="http://www.anguloweb.com.br/" title="AnguloWeb" id="marcadagua">
                    <img src="../imagens/AWMdagua.png" alt="AnguloWeb">
                </a>
            </footer>
        </div>
    </body>
</html>
